package com.sbio.udiapp.util;

import android.content.Context;
import android.graphics.Color;
import android.os.Build;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import com.sbio.udiapp.R;

public class WhiteCustomToast {
    public static void Make(Context context, String message) {
        Toast toast = Toast.makeText(context, message, Toast.LENGTH_SHORT);
        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
            View view = toast.getView();
            view.setBackgroundResource(R.drawable.ic_baseline_check_24);
            TextView text = new TextView(context);//(TextView) view.findViewById(R.id.message);
            //text.setTextColor(context.getResources().getColor(R.color.white));
            text.setTextColor(Color.parseColor("#FFFFFFFF"));
            text.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
//            text.setTypeface(Utilities.Ubuntu_Regular);
            text.setTextSize(14f);
        }
        toast.show();
    }
}